package com.central.gateway.common;

public class LogVo {

    private String method;

    private String uniqueId;

    private String url;

    private String queryParameter;

    private String bodyParameter;

    private long startTime;

    private long endTime;

    private int statusCode;

    private String riskManageResponseResult;

    private String requestParameter;

    private String responseResult;

    public LogVo() {
    }

    public LogVo(String uniqueId, String method, String url, String queryParameter, long startTime) {
        this.uniqueId = uniqueId;
        this.method = method;
        this.url = url;
        this.queryParameter = queryParameter;
        this.startTime = startTime;
    }

    public LogVo(String uniqueId, String method, String url, String queryParameter, String bodyParameter, long startTime) {
        this.uniqueId = uniqueId;
        this.method = method;
        this.url = url;
        this.queryParameter = queryParameter;
        this.bodyParameter = bodyParameter;
        this.startTime = startTime;
    }

    public LogVo(String uniqueId, String method, String url, String queryParameter, long startTime, long endTime, int statusCode, String riskManageResponseResult, String responseResult) {
        this.uniqueId = uniqueId;
        this.method = method;
        this.url = url;
        this.queryParameter = queryParameter;
        this.startTime = startTime;
        this.endTime = endTime;
        this.statusCode = statusCode;
        this.riskManageResponseResult = riskManageResponseResult;
        this.responseResult = responseResult;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getUniqueId() {

        return uniqueId;
    }

    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getQueryParameter() {
        return queryParameter;
    }

    public void setQueryParameter(String queryParameter) {
        this.queryParameter = queryParameter;
    }

    public String getBodyParameter() {
        return bodyParameter;
    }

    public void setBodyParameter(String bodyParameter) {
        this.bodyParameter = bodyParameter;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    public String getRiskManageResponseResult() {
        return riskManageResponseResult;
    }

    public void setRiskManageResponseResult(String riskManageResponseResult) {
        this.riskManageResponseResult = riskManageResponseResult;
    }

    public String getRequestParameter() {
        return requestParameter;
    }

    public void setRequestParameter(String requestParameter) {
        this.requestParameter = requestParameter;
    }

    public String getResponseResult() {
        return responseResult;
    }

    public void setResponseResult(String responseResult) {
        this.responseResult = responseResult;
    }

    @Override
    public String toString() {
        return "{" +
                "method='" + method + '\'' +
                ", uniqueId='" + uniqueId + '\'' +
                ", url='" + url + '\'' +
                ", queryParameter='" + queryParameter + '\'' +
                ", bodyParameter='" + bodyParameter + "\'" +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", executeTime=" + (endTime - startTime) +
                ", statusCode=" + statusCode +
                ", riskManageResponseResult=" + riskManageResponseResult +
                ", requestParameter=" + requestParameter +
                ", responseResult='" + responseResult + '\'' +
                '}';
    }
}
